package com.zadtek.shopmall.activities;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.zadtek.shopmall.Event.EventTest;
import com.zadtek.shopmall.R;
import com.zadtek.shopmall.base.AbsActivity;

import org.greenrobot.eventbus.EventBus;

public class PublishInfoDownActivity extends AbsActivity implements View.OnClickListener {
    private TextView topTitle,tvHome,tvDetail;
    private ImageView icBack;
    @Override
    public int setView() {
        return R.layout.activity_publish_info_down;
    }

    @Override
    public void initBasic(Bundle savedInstanceState) {
        initView();
        initLogic();
    }

    private void initView() {
        icBack = findViewById(R.id.ic_back);
        topTitle = findViewById(R.id.title);
        tvDetail = findViewById(R.id.tv_show_detail);
        tvHome = findViewById(R.id.tv_back_home);
        icBack.setVisibility(View.VISIBLE);
        topTitle.setText("发布成功");
    }

    private void initLogic(){
        icBack.setOnClickListener(this);
        tvHome.setOnClickListener(this);
        tvDetail.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.ic_back:
                finish();
                break;
            case R.id.tv_back_home:
                EventBus.getDefault().post(new EventTest(1));
                finish();
                break;
            case R.id.tv_shop_detail:
                break;
        }
    }
}
